package net.rokyinfo.basedao.mapper;

import net.rokyinfo.basedao.entity.User;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * Created by Administrator on 2016/8/2.
 */
public interface UserMapper {

    public List<User> getAll();

    public User getUserById(long id);

    public User getUserByName(String username);

    public User getUserByMobile(String mobile);

    public void updatePassword(@Param("mobile") String mobile,
                               @Param("password") String password, @Param("md5Password") String md5Password);

    public List<User> getUserByNickname(String nickname);

    public void addUser(User user);

    public void updateLockPassword(@Param("mobile") String mobile,
                                   @Param("lockType") int lockType, @Param("lockPassword") String lockPassword);

    public void updateUserGender(@Param("userId") long userId, @Param("gender") int gender);

    public void updateUserNickname(@Param("userId") long userId, @Param("nickname") String nickname);

    public void updateUserHeadImgUrl(@Param("userId") long userId, @Param("headImgUrl") String headImgUrl);
}
